package cn.lg.soar.cms.biz.member.controller;

import cn.lg.soar.cms.biz.config.CtrlPathConst;
import cn.lg.soar.cms.biz.modules.article.entity.Article;
import cn.lg.soar.common.model.HttpResult;
import cn.lg.soar.core.annotations.IdempotentByParam;
import cn.lg.soar.core.annotations.constraints.Id;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.List;

/**
 * 会员文章管理
 * @author luguoxiang
 * @since 2025-02-23
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Tag(name = "会员文章管理")
@Validated
@RestController
@RequestMapping(CtrlPathConst.MEMBER + "/member/article")
public class MemberArticleController {

    @IdempotentByParam("#p0")
    @Operation(summary = "保存")
    @RequestMapping(path = "save", method = RequestMethod.POST)
    public HttpResult<Serializable> save(@RequestBody @Validated Article data) {
        // TODO
        return null;
    }

    @Operation(summary = "保存并发布")
    @RequestMapping(path = "submit", method = RequestMethod.POST)
    public HttpResult<Serializable> submit(@RequestBody @Validated Article data) {
        // TODO
        return null;
    }

    @Operation(summary = "发布")
    @RequestMapping(path = "publish", method = RequestMethod.POST)
    public HttpResult<Serializable> publish(@RequestBody List<Long> ids) {
        // TODO
        return null;
    }

    @Operation(summary = "下架")
    @RequestMapping(path = "down", method = RequestMethod.POST)
    public HttpResult<Serializable> down(@RequestBody List<Long> ids) {
        // TODO
        return null;
    }

    @Operation(summary = "删除")
    @RequestMapping(path = "remove", method = RequestMethod.POST)
    public HttpResult<Serializable> remove(@RequestBody List<Long> ids) {
        // TODO
        return null;
    }

    @Operation(summary = "分页查询")
    @RequestMapping(path = "query", method = RequestMethod.GET)
    public HttpResult<Serializable> query(@RequestParam(name = "id") @Id Long id) {
        // TODO
        return null;
    }

    @Operation(summary = "详情")
    @RequestMapping(path = "detail", method = RequestMethod.GET)
    public HttpResult<Serializable> detail(@RequestParam(name = "id") @Id Long id) {
        // TODO
        return null;
    }

    @Operation(summary = "点赞")
    @RequestMapping(path = "like", method = RequestMethod.GET)
    public HttpResult<Serializable> like(@RequestParam(name = "id") @Id Long id) {
        // TODO
        return null;
    }

    @Operation(summary = "评论")
    @RequestMapping(path = "comment", method = RequestMethod.GET)
    public HttpResult<Serializable> comment(@RequestParam(name = "id") @Id Long id) {
        // TODO
        return null;
    }

    @Operation(summary = "收藏")
    @RequestMapping(path = "collect", method = RequestMethod.GET)
    public HttpResult<Serializable> collect(@RequestParam(name = "id") @Id Long id) {
        // TODO
        return null;
    }

}